package com.helen.mybatis.configration;

import com.google.common.collect.Maps;

import javax.sql.DataSource;
import java.util.Map;

/**
 * @author helenlee
 * @date 2020/4/7
 */
public class Configuration {
    private DataSource dataSource;
    private Map<String,MappedStatement> mappedStatementMap = Maps.newHashMap();

    public DataSource getDataSource() {
        return dataSource;
    }

    public void setDataSource(DataSource dataSource) {
        this.dataSource = dataSource;
    }

    public Map<String, MappedStatement> getMappedStatementMap() {
        return mappedStatementMap;
    }

    public void setMappedStatementMap(Map<String, MappedStatement> mappedStatementMap) {
        this.mappedStatementMap = mappedStatementMap;
    }

    public MappedStatement getMappedStatementById(String statementId) {
        return mappedStatementMap.get(statementId);
    }
}
